package com.camelgreen.sys.dao;




import org.springframework.stereotype.Component;

import com.camelgreen.baseclass.BaseIbatis3Dao;
import com.camelgreen.page.Page;
import com.camelgreen.page.PageParameter;
import com.camelgreen.sys.model.User;

@Component
public class UserDao extends BaseIbatis3Dao<User,java.lang.String>{

	
	public Class getEntityClass() {
		
		return User.class;
	}

	public void saveOrUpdate(User entity) {
		if(entity.getId() == null) 
			save(entity);
		else 
			update(entity);
		
	}
	
	
	public Page<User> findByPageRequest(PageParameter pageRequest) {
		return pageQuery("UserMapper.pageSelect",pageRequest);
	}
	

}
